package com.goktech.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.goktech.dao.StudentDao;
import com.goktech.domain.Student;
import com.goktech.service.StudentService;

@Service
public class StudentServiceImpl implements StudentService {

	@Autowired
	private StudentDao studentDao;

	@Override
	public boolean add(Student student) {
		return studentDao.insert(student) > 0 ? true : false;
	}

	@Override
	public List<Student> selectAll() {
		// TODO Auto-generated method stub
		List<Student> list=studentDao.selectAll();
		return  list;
	}

	@Override
	public boolean delete(Integer id) {
		// TODO Auto-generated method stub
		return studentDao.delete(id) > 0 ? true : false;
	}

}
